import { Plugin, Context } from "@nuxt/types";


const router: Plugin = (context: Context) => {
  const { app } = context
  app.router?.beforeEach((_to, _from, nuxt) => {
    console.log("前置路由守卫")
    nuxt()
  })

  app.router?.afterEach(() => {
    console.log("后置路由守卫")
  });
}

export default router
